package com.sky.service;

import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.OrderPaymentVO;
import com.sky.vo.OrderStatisticsVO;
import com.sky.vo.OrderSubmitVO;
import com.sky.vo.OrderVO;

public interface OrderService {
    //用户下单
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    //查询订单
    OrderVO selectOrder(Long id);

    //订单搜索
    PageResult OrdersSearch(OrdersPageQueryDTO ordersPageQueryDTO);

    //订单数量统计
    OrderStatisticsVO Statistics();

    //接单
    void takeOrders(OrdersConfirmDTO orders);

    //完成订单
    void CompleteOrders(Long id);

    //派送订单
    void deliverOrders(Long id);

    //取消订单
    void CancelOrders(OrdersRejectionDTO ordersRejectionDTO);

    //拒单
    void rejectionById(OrdersRejectionDTO ordersRejectionDTO) ;

    //历史订单查询
    PageResult page(OrdersPageQueryDTO ordersPageQueryDTO);

    //客户催单
    void reminder(Long id);

    /**
     * 查询订单详情
     * @param id
     * @return
     */
    OrderVO details(Long id);
}
